$type: (
  default: $black,
  primary: $primary,
  green: $green,
  yellow: $yellow,
  red: $red,
);

@mixin generate($c) {
  box-shadow: 0 unit(2) unit(4) 0 rgba($color: $c, $alpha: 0.075);
  &-mini {
    box-shadow: 0 unit(1) unit(2) 0 rgba($color: $c, $alpha: 0.05);
  }
  &-small {
    box-shadow: 0 unit(3) unit(6) unit(-2) rgba($color: $c, $alpha: 0.1);
  }
  &-large {
    box-shadow: 0 unit(4) unit(8) unit(-4) rgba($color: $c, $alpha: 0.25);
  }
}

.shadow {
  @each $key, $val in $type {
    @if $key == default {
      @include generate($val);
    } @else {
      &-#{quote(#{$key})} {
        @include generate($val);
      }
    }
  }
  &-inner {
    box-shadow: inset 0 unit(2) unit(4) 0 rgba(0, 0, 0, 0.06);
  }
  &-none {
    box-shadow: none;
  }
}
